<template>
  <div class="pay-item">
    <div class="name">{{ data.pmName }}</div>
    <div class="date">{{ data.particularYear }}第{{ data.payQuarter }}季度党费</div>
    <div class="operate">
      <div class="amount">
        <span>￥</span>
        <span style="font-size: 20px;">{{ Number(data.realitycostMoney).toFixed(2) }}</span>
      </div>
      <div class="btn" @click="startPay">
        立即缴费
      </div>
    </div>
  </div>
</template>

<script setup lang='ts'>
import { PropType, ref } from 'vue';
import { IUnPay } from '../../type';
const props = defineProps({
  data: {
    // 他是自定义类型
    type: Object as PropType<IUnPay>,
    default: () => ({})
  },
})
const emit = defineEmits(["pay"]);
function startPay() {
  emit('pay', props.data)
}
</script>

<style lang='less' scoped>
.pay-item {
  padding: 15px 20px;
  box-sizing: border-box;
  border-radius: 6px;
  text-align: left;
  color: black;
  background: url('@/assets/img/pay_bg.png') no-repeat;
  background-position: 100% 10%;
  background-color: #fff;
  margin-top: 10px;

  .operate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;

  }

  .amount {
    font-weight: 900;
  }

  .name {
    font-size: 16px;
  }

  .date {
    color: #8893a7;
    font-size: 14px;
    margin-top: 7px;

  }

  .btn {
    padding: 8px 15px;
    border-radius: 35px;
    background-color: #d10201;
    color: white;
    font-size: 14px;

  }
}
</style>